import errorFun from '../../util/errorFun';

Page({
    data: {
        userInfo:{},
        funImagesList:[
            {title:"本地下载",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/musics.png"},
            {title:"云盘",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/uploading.png"},
            {title:"已购",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/order.png"},
            {title:"最近播放",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/suspend.png"},
            {title:"我的好友",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/friend.png"},
            {title:"收藏和赞",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/collect.png"},
            {title:"我的播客",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/aignal.png"},
            {title:"音乐应用",img:"cloud://j-1g278wytc94978ae.6a2d-j-1g278wytc94978ae-1304416950/images/add.png"}
        ]
    },
    onLoad(options) {
        
    },
    bindgetuserinfo(){
        wx.showLoading({
            title: '加载中',
            mask: true,
        })
        wx.login({
          timeout: 300,
        }).then(res => {
            wx.hideLoading()
            wx.getUserInfo({
              lang: 'zh_CN',
            }).then(res => {
                wx.showToast({
                  title: '登录成功',
                  duration: 2000,
                  mask: true
                })
                this.setData({
                    userInfo:res.userInfo
                })
            }).catch(err => {
                errorFun(err);
            })
        }).catch(err => {
            errorFun(err);
        })
    },
    bindLikeList(){
        console.log('喜欢列表')
    }
})